const express = require("express")

const app = express()

const svgCaptcha = require("svg-captcha")


app.get("/", function (req, res) {
    res.setHeader("Access-Control-Allow-Origin", "*")
    // 创建验证码
    const cap = svgCaptcha.create({
        size: 6,
        width: 160,
        height:40,
        fontSize: 50,
        ignoreChars: '0oO1ilI',
        noise: 5,// 干扰线
        color: true,
        background: '#eee'
    })

    res.send(cap)
})

app.listen(3000)
// app.post()
// app.put()

